package com.airnewslinkosky.ticket.net;

import java.util.HashMap;

import com.airnewslinkosky.ticket.util.Constants;
import com.airnewslinkosky.ticket.util.MD5;

public class EncryptUtil {
	public static HashMap<String, String> encryptNet(
			HashMap<String, String> params) {
		long timestamp = System.currentTimeMillis();
		params.put(Constants.FIELD_ENCRYPT_UID, Constants.EFLY_ENCRYPT_UID);
		params.put(Constants.FIELD_ENCRYPT_TIMESTAMP, timestamp + "");
		String hashcode = MD5.crypt(Constants.EFLY_ENCRYPT_UID
				+ Constants.EFLY_ENCRYPT_PASSWORD + timestamp).toUpperCase();
		params.put(Constants.FIELD_ENCRYPT_HASHCODE, hashcode);
		return params;
	}
}
